﻿using HQHS.Library.Common.Threading;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HQHS.Library.Common.Caching
{
    public delegate object LoadItemDelegate(object key);
    public interface ICacheManager<TKey, TValue>
    {
        void Refresh(ref CachedItemInfo<TKey, TValue> element, LoadItemDelegate loadMethod, KeyedReaderWriterLockSlim<TKey> loadLock);
        void RefreshAll();
        LoadItemDelegate LoadItem { get; }
    }
}
